package top.z.orm.core.osql.service;

import top.z.orm.core.osql.*;

import java.util.List;

/**
 * 默认抽象通用丰富的面向对象SQL服务实现类
 */
public abstract class ObjSQLRichAbstractServiceImpl extends ObjSQLAbstractServiceImpl implements ObjSQLRichService {

    public abstract SuidRich getSuidRich();

    @Override
    public <T> List<T> select(T entity, int size) {
        return getSuidRich().select(entity, size);
    }

    @Override
    public <T> List<T> select(T entity, int start, int size) {
        return getSuidRich().select(entity, start, size);
    }

    @Override
    public <T> List<T> select(T entity, String selectFields, int start, int size) {
        return getSuidRich().select(entity, selectFields, start, size);
    }

    @Override
    public <T> List<T> select(T entity, String selectFields) {
        return getSuidRich().select(entity, selectFields);
    }

    @Override
    public <T> Integer insert(T[] entity) {
        return getSuidRich().insert(entity);
    }

    @Override
    public <T> Integer insert(T[] entity, String excludeFieldList) {
        return getSuidRich().insert(entity, excludeFieldList);
    }

    @Override
    public <T> Integer insert(T[] entity, int batchSize) {
        return getSuidRich().insert(entity, batchSize);
    }

    @Override
    public <T> Integer insert(T[] entity, int batchSize, String excludeFieldList) {
        return getSuidRich().insert(entity, batchSize, excludeFieldList);
    }

    @Override
    public <T> Integer update(T entity, String updateFieldList) {
        return getSuidRich().update(entity, updateFieldList);
    }

    @Override
    public <T> T selectOne(T entity) {
        return getSuidRich().selectOne(entity);
    }

    @Override
    public <T> String selectWithFun(T entity, FunctionType functionType, String fieldForFun) {
        return getSuidRich().selectWithFun(entity, functionType, fieldForFun);
    }

    @Override
    public <T> String selectWithFun(T entity, FunctionType functionType, String fieldForFun, Condition condition) {
        return getSuidRich().selectWithFun(entity, functionType, fieldForFun, condition);
    }

    @Override
    public <T> Integer count(T entity) {
        return getSuidRich().count(entity);
    }

    @Override
    public <T> Integer count(T entity, Condition condition) {
        return getSuidRich().count(entity, condition);
    }

    @Override
    public <T> List<T> selectOrderBy(T entity, String orderFieldList) {
        return getSuidRich().selectOrderBy(entity, orderFieldList);
    }

    @Override
    public <T> List<T> selectOrderBy(T entity, String orderFieldList, OrderType[] orderTypes) {
        return getSuidRich().selectOrderBy(entity, orderFieldList, orderTypes);
    }

    @Override
    public <T> Integer update(T entity, String updateFieldList, IncludeType includeType) {
        return getSuidRich().update(entity, updateFieldList, includeType);
    }

    @Override
    public <T> List<T> select(T entity, IncludeType includeType) {
        return getSuidRich().select(entity, includeType);
    }

    @Override
    public <T> Integer update(T entity, IncludeType includeType) {
        return getSuidRich().update(entity, includeType);
    }

    @Override
    public <T> Integer insert(T entity, IncludeType includeType) {
        return getSuidRich().insert(entity, includeType);
    }

    @Override
    public <T> Integer delete(T entity, IncludeType includeType) {
        return getSuidRich().delete(entity, includeType);
    }

    @Override
    public <T> List<String[]> selectString(T entity) {
        return getSuidRich().selectString(entity);
    }

    @Override
    public <T> List<String[]> selectString(T entity, String selectFields) {
        return getSuidRich().selectString(entity, selectFields);
    }

    @Override
    public <T> String selectJson(T entity) {
        return getSuidRich().selectJson(entity);
    }

    @Override
    public <T> String selectJson(T entity, IncludeType includeType) {
        return getSuidRich().selectJson(entity, includeType);
    }

    @Override
    public <T> T selectById(T entity, Integer id) {
        return getSuidRich().selectById(entity, id);
    }

    @Override
    public <T> T selectById(T entity, Long id) {
        return getSuidRich().selectById(entity, id);
    }

    @Override
    public <T> T selectById(T entity, String id) {
        return getSuidRich().selectById(entity, id);
    }

    @Override
    public <T> List<T> selectByIds(T entity, String ids) {
        return getSuidRich().selectByIds(entity, ids);
    }

    @Override
    public Integer deleteById(Class<?> clazz, Integer id) {
        return getSuidRich().deleteById(clazz, id);
    }

    @Override
    public Integer deleteById(Class<?> clazz, Long id) {
        return getSuidRich().deleteById(clazz, id);
    }

    @Override
    public Integer deleteById(Class<?> clazz, String ids) {
        return getSuidRich().deleteById(clazz, ids);
    }

    @Override
    public <T> String selectJson(T entity, Condition condition) {
        return getSuidRich().selectJson(entity, condition);
    }

    @Override
    public <T> Integer updateBy(T entity, String whereFields) {
        return getSuidRich().updateBy(entity, whereFields);
    }

    @Override
    public <T> Integer updateBy(T entity, String whereFields, IncludeType includeType) {
        return getSuidRich().updateBy(entity, whereFields, includeType);
    }

    @Override
    public <T> Integer updateBy(T entity, String whereFields, Condition condition) {
        return getSuidRich().updateBy(entity, whereFields, condition);
    }

    @Override
    public <T> Integer updateById(T entity, Condition condition) {
        return getSuidRich().updateById(entity, condition);
    }

    @Override
    public <T> Integer update(T entity, String updateFields, Condition condition) {
        return getSuidRich().update(entity, updateFields, condition);
    }

    @Override
    public <T> Integer update(T entity, Condition condition) {
        return getSuidRich().update(entity, condition);
    }

    @Override
    public <T> Integer insert(List<T> entityList) {
        return getSuidRich().insert(entityList);
    }

    @Override
    public <T> Integer insert(List<T> entityList, int batchSize) {
        return getSuidRich().insert(entityList, batchSize);
    }

    @Override
    public <T> Integer insert(List<T> entityList, String excludeFields) {
        return getSuidRich().insert(entityList, excludeFields);
    }

    @Override
    public <T> Integer insert(List<T> entityList, int batchSize, String excludeFields) {
        return getSuidRich().insert(entityList, batchSize, excludeFields);
    }

    @Override
    public <T> List<String[]> selectString(T entity, Condition condition) {
        return getSuidRich().selectString(entity, condition);
    }

}
